cmake_minimum_required(VERSION 3.14)
project(kimi_chat LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 让编译器能把 include/ 当头文件目录
include_directories(${CMAKE_SOURCE_DIR}/include)

# 找系统 libcurl
find_package(CURL REQUIRED)
if(NOT CURL_FOUND)
    message(FATAL_ERROR "请安装 libcurl-dev：sudo apt install libcurl4-openssl-dev")
endif()

# 收集源码（main.cpp + src 下所有 .cpp）
file(GLOB_RECURSE SRCS
     ${CMAKE_SOURCE_DIR}/main.cpp
     ${CMAKE_SOURCE_DIR}/src/*.cpp)

# 可执行目标
add_executable(${PROJECT_NAME} ${SRCS})
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)